@isTest
private class vrfCtlr_Tests {

    
    public static testMethod void testMyController1()
    {
        //Test Data...
        
        Account acc = new Account();
        acc.Name = 'Test';
        insert acc;
        
        
        Emirates__c emiratesObject = new Emirates__c();
        emiratesObject.Name = 'Test';
        emiratesObject.Active__c = true;
        emiratesObject.E_form_code__c = 'Test';
        insert emiratesObject;
        
        City__c cityObject = new City__c();
        cityObject.Name = 'Test';
        cityObject.Active__c = true;
        cityObject.E_form_code__c = 'Test';
        cityObject.Emirates__c  = emiratesObject.Id;
        insert cityObject;
        
        Area__c areaObject = new Area__c();
        areaObject.Name = 'Test';
        areaObject.Active__c = true;
        areaObject.E_form_code__c = 1;
        areaObject.City__c = cityObject.Id;
        insert areaObject;
        
        Country__c Countries = new Country__c();
        Countries.Name = 'Test';
        Countries.eFormCode__c = 'Test';
        Countries.IsActive__c = true;
        insert COuntries;
        
        
        CountriesList__c CountriesList = new CountriesList__c();
        CountriesList.Name = 'Test';
        CountriesList.IsActive__c = true;
        CountriesList.eFormCode__c = 'Test';
        insert CountriesList;
        
        Occupation__c OCP = new Occupation__c();
        OCP.Name = 'Test';
        OCP.IsActive__c = true;
        OCP.eFormCode__c = 'Test';
        insert OCP;
        
        Qualification__c QualificationsList = new Qualification__c();
        QualificationsList.Name = 'Test';
        QualificationsList.IsActive__c = true;
        QualificationsList.eFormCode__c = 'Test';
        insert QualificationsList;
        
        Passport_Type__c pt = new Passport_Type__c();
        pt.Name = 'Test';
        pt.IsActive__c = true;
        pt.eFormCode__c = 'Test';
        insert pt;
        
        List<Form_Header__c> formHeaderList = new List<Form_Header__c>();
        
        Form_Header__c formHeader12 = new Form_Header__c();
        formHeader12.Name = 'Non DIFC Sponsorship Form - New - Outside UAE - Visa Stamping';
        formHeader12.Barcode_Type__c = 'QR';
        formHeaderList.add(formHeader12);
        
        Form_Header__c formHeader1 = new Form_Header__c();
        formHeader1.Name = 'SAP1';
        formHeader1.Barcode_Type__c = 'QR';
        formHeaderList.add(formHeader1);
        
        Form_Header__c formHeader2 = new Form_Header__c();
        formHeader2.Name = 'SAP2';
        formHeader2.Barcode_Type__c = 'QR';
        formHeaderList.add(formHeader2);
        
        Form_Header__c formHeader3 = new Form_Header__c();
        formHeader3.Name = 'SAP3';
        formHeader3.Barcode_Type__c = 'QR';
        formHeaderList.add(formHeader3);
        
        Form_Header__c formHeader4 = new Form_Header__c();
        formHeader4.Name = 'DIFC Sponsorship Form - Transfer';
        formHeader4.Barcode_Type__c = 'QR';
        formHeaderList.add(formHeader4);
        
        Form_Header__c formHeader5 = new Form_Header__c();
        formHeader5.Name = 'DIFC Sponsorship Form - Renewal';
        formHeader5.Barcode_Type__c = 'QR';
        formHeaderList.add(formHeader5);
        
        Form_Header__c formHeader6 = new Form_Header__c();
        formHeader6.Name = 'DIFC Sponsorship Form - New';
        formHeader6.Barcode_Type__c = 'QR';
        formHeaderList.add(formHeader6);
        
        //If insert the Form Header...
        if(formHeaderList.size() > 0)
            insert formHeaderList;
        
        List<Field_Master__c> fieldMasterList = new List<Field_Master__c>();
        
        
        Field_Master__c masterObject1 = new Field_Master__c();
        masterObject1.API_Name__c = 'First_Name__c';
        masterObject1.IsActive__c = true;
        masterObject1.Name = 'First_Name__c';
        masterObject1.Reference_To__c = '()';
        masterObject1.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject1);
        
        Field_Master__c masterObject2 = new Field_Master__c();
        masterObject2.API_Name__c = 'Middle_Name__c';
        masterObject2.IsActive__c = true;
        masterObject2.Name = 'Middle_Name__c';
        masterObject2.Reference_To__c = '()';
        masterObject2.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject2);
        
        Field_Master__c masterObject3 = new Field_Master__c();
        masterObject3.API_Name__c = 'Last_Name__c';
        masterObject3.IsActive__c = true;
        masterObject3.Name = 'Last_Name__c';
        masterObject3.Reference_To__c = '()';
        masterObject3.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject3);
        
        Field_Master__c masterObject4 = new Field_Master__c();
        masterObject4.API_Name__c = 'Gender__c';
        masterObject4.IsActive__c = true;
        masterObject4.Name = 'Gender__c';
        masterObject4.Reference_To__c = '()';
        masterObject4.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject4); 
        
        Field_Master__c masterObject5 = new Field_Master__c();
        masterObject5.API_Name__c = 'Date_of_Birth__c';
        masterObject5.IsActive__c = true;
        masterObject5.Name = 'Date_of_Birth__c';
        masterObject5.Reference_To__c = '()';
        masterObject5.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject5);
        
        
        Field_Master__c masterObject6 = new Field_Master__c();
        masterObject6.API_Name__c = 'City_of_Birth__c';
        masterObject6.IsActive__c = true;
        masterObject6.Name = 'City_of_Birth__c';
        masterObject6.Reference_To__c = '()';
        masterObject6.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject6);
        
        
        Field_Master__c masterObject7 = new Field_Master__c();
        masterObject7.API_Name__c = 'Passport_Number__c';
        masterObject7.IsActive__c = true;
        masterObject7.Name = 'Passport_Number__c';
        masterObject7.Reference_To__c = '()';
        masterObject7.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject7);
        
        Field_Master__c masterObject8 = new Field_Master__c();
        masterObject8.API_Name__c = 'Passport_City_of_Issue__c';
        masterObject8.IsActive__c = true;
        masterObject8.Name = 'Passport_City_of_Issue__c';
        masterObject8.Reference_To__c = '()';
        masterObject8.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject8);
        
        
        Field_Master__c masterObject9 = new Field_Master__c();
        masterObject9.API_Name__c = 'Passport_Issue_Date__c';
        masterObject9.IsActive__c = true;
        masterObject9.Name = 'Passport_Issue_Date__c';
        masterObject9.Reference_To__c = '()';
        masterObject9.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject9);
        
        Field_Master__c masterObject10 = new Field_Master__c();
        masterObject10.API_Name__c = 'Passport_Expiry_Date__c';
        masterObject10.IsActive__c = true;
        masterObject10.Name = 'Passport_Expiry_Date__c';
        masterObject10.Reference_To__c = '()';
        masterObject10.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject10);
        
        
        Field_Master__c masterObject11 = new Field_Master__c();
        masterObject11.API_Name__c = 'Religion__c';
        masterObject11.IsActive__c = true;
        masterObject11.Name = 'Religion__c';
        masterObject11.Reference_To__c = '()';
        masterObject11.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject11);
        
        Field_Master__c masterObject12 = new Field_Master__c();
        masterObject12.API_Name__c = 'Marital_Status__c';
        masterObject12.IsActive__c = true;
        masterObject12.Name = 'Marital_Status__c';
        masterObject12.Reference_To__c = '()';
        masterObject12.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject12);
        
        Field_Master__c masterObject13 = new Field_Master__c();
        masterObject13.API_Name__c = 'Applicant_Mobile_Number__c';
        masterObject13.IsActive__c = true;
        masterObject13.Name = 'Applicant_Mobile_Number__c';
        masterObject13.Reference_To__c = '()';
        masterObject13.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject13);
        
        Field_Master__c masterObject14 = new Field_Master__c();
        masterObject14.API_Name__c = 'Mother_Full_Name__c';
        masterObject14.IsActive__c = true;
        masterObject14.Name = 'Mother_Full_Name__c';
        masterObject14.Reference_To__c = '()';
        masterObject14.Referencing_Value__c = 'eFormCode__c';
        fieldMasterList.add( masterObject14);
        
        if(fieldMasterList.size() > 0)
            insert fieldMasterList;
        
        
        List<Form_Detail__c> formDetailList = new List<Form_Detail__c>();
        
        //Form Detail...
        for(Form_Header__c formHeader : formHeaderList)
        {
            integer counter = 1;
            for(Field_Master__c masterObject : fieldMasterList )
            {
                Form_Detail__c formDetail1 = new Form_Detail__c();
                formDetail1.Source__c = 'Form';
                formDetail1.Field_Master__c = masterObject.Id;
                formDetail1.Form_Header__c = formHeader.Id;
                formDetail1.Tab_Space__c = string.valueof(counter);
                formDetail1.Position__c = counter;
                //Adding in the List...
                formDetailList.add(formDetail1);
                
                counter++;
            }
            
            Form_Detail__c formDetail1 = new Form_Detail__c();
            formDetail1.Source__c = 'Constant';
            formDetail1.Form_Header__c = formHeader.Id;
            formDetail1.Tab_Space__c = string.valueof(counter);
            formDetail1.Position__c = counter;
            //Adding in the List...
            formDetailList.add(formDetail1);
            
        }
        
        //inserting the form Details...
        if(formDetailList.size() > 0)
            insert formDetailList;
        
        
        
        //Negative Test Class...
        vrf_ctlr controller6 = new vrf_ctlr();
        controller6.Application.VRF_Visa_Type__c = 'New Visa';
        controller6.Application.VRF_Pre_approval_required__c = false;
        controller6.Application.VRF_Transfer_Flag__c = true;
        //controller6.Application.VRF_Available_In__c = 'Individual is currently sponsored by Dubai Government Entity or a Free zone';
        controller6.Application.VRF_Available_In__c = 'Individual is currently sponsored by father/husband/another individual';
        //controller6.Application.VRF_Available_In__c = 'individual currently inside UAE';
        string dateEntry  = String.valueOf(System.Today().addyears(1)); 
        System.debug('The Date Format => '+ dateEntry);
        dateEntry = string.valueOf(dateEntry.split('-')[1]+'-'+dateEntry.split('-')[2]+'-'+dateEntry.split('-')[0]);
        System.debug('The Date Format 1=> '+ dateEntry);
        //controller6.lastDateOfEntry = dateEntry;
        controller6.SponserDate = dateEntry;
        controller6.SponserResidencyExpiry = dateEntry;
        controller6.SponserPassportExpiry = dateEntry;
        //controller6.CreateApplication();
        
        controller6.Application.Marital_Status__c = 'Test';
        controller6.Application.Mother_Full_Name__c = 'Test';
        controller6.Application.Religion__c = 'Test';
        controller6.Application.Job_Title_Position__c = OCP.Id;
        controller6.Application.Education_Qualification__c = QualificationsList.Id;
        controller6.Application.Gender__c = 'Test';
        controller6.Application.outside_city__c = 'Test'; 
        controller6.Application.Country_of_Birth__c = CountriesList.Id;
        controller6.Application.address_line_1__c = 'Test';
        controller6.Application.outside_city__c = 'Test';
        controller6.Application.Applicant_Mobile_Number__c = '123456789';
        controller6.Application.outside_country__c = CountriesList.Id;
        controller6.Application.outside_telephone_number__c = '12353';
        controller6.Application.Emirates_dropdown__c = emiratesObject.Id;
        controller6.Application.City_dropdown__c  = cityObject.Id;
        controller6.Application.Area_dropdown__c = areaObject.Id;
        controller6.Application.P_O_Box__c = '12353';
        controller6.Application.Name_of_Authorized_Signatory__c = 'Test';
        controller6.Application.inside_residence_telephone__c = '12353'; 
        controller6.Application.inside_office_telephone__c = '12353';
        controller6.Application.applicants_email_address__c = 'xyz@xyz.com';
        controller6.Application.Company_Name__c = acc.Id;
        controller6.Application.Establishment_Name1__c = acc.Id;
        string passportIssue  = String.valueOf(System.Today().addyears(1)); 
        passportIssue = string.valueOf(passportIssue.split('-')[1]+'-'+passportIssue.split('-')[2]+'-'+passportIssue.split('-')[0]);
        string passportExpiry  = String.valueOf(System.Today().addyears(3)); 
        
        passportExpiry = string.valueOf(passportExpiry.split('-')[1]+'-'+passportExpiry.split('-')[2]+'-'+passportExpiry.split('-')[0]);
        
        controller6.companyDate = passportIssue;//String.valueOf(System.Today().addyears(1));
        controller6.Application.City_of_Birth__c = 'Test'; 
        controller6.Application.Passport_Number__c = 'Test'; 
        controller6.passportIssueDate = passportIssue;//String.valueOf(System.Today().addyears(1));
        controller6.passportExpiryDate = passportExpiry;//String.valueOf(System.Today().addyears(3));
        controller6.Application.Passport_Country_of_Issue__c = CountriesList.Id;
        controller6.Application.Passport_City_of_Issue__c = 'Karachi';
        
        controller6.Application.Company_Index_Card_Number__c = 'Test';
        string dateBirth  = String.valueOf(System.Today().addyears(1)); 
        dateBirth = string.valueOf(dateBirth.split('-')[1]+'-'+dateBirth.split('-')[2]+'-'+dateBirth.split('-')[0]);
        controller6.dateOfBirth = dateBirth; //String.valueOf(System.Today().addyears(1));
        controller6.Application.Currently_Nationality__c = Countries.Id;
        controller6.Application.Previous_Nationality__c = Countries.Id;
        controller6.Application.Title__c = 'Test';
        controller6.Application.First_Name__c = 'Test';
        controller6.Application.Last_Name__c = 'Test';
        controller6.CreateApplication();
        
        vrf_ctlr controller7 = new vrf_ctlr();
        controller7.Application.VRF_Visa_Type__c = 'New Visa';
        controller7.Application.VRF_Pre_approval_required__c = false;
        controller7.Application.VRF_Transfer_Flag__c = true;
        controller7.Application.VRF_Available_In__c = 'Individual is currently sponsored by Dubai Government Entity or a Free zone';
        //controller7.Application.VRF_Available_In__c = 'individual currently outside UAE';
        //controller7.lastDateOfEntry = dateEntry;
        
        controller7.Application.Marital_Status__c = 'Test';
        controller7.Application.Mother_Full_Name__c = 'Test';
        controller7.Application.Religion__c = 'Test';
        controller7.Application.Job_Title_Position__c = OCP.Id;
        controller7.Application.Education_Qualification__c = QualificationsList.Id;
        controller7.Application.Gender__c = 'Test';
        controller7.Application.outside_city__c = 'Test'; 
        controller7.Application.Country_of_Birth__c = CountriesList.Id;
        controller7.Application.address_line_1__c = 'Test';
        controller7.Application.outside_city__c = 'Test';
        controller7.Application.outside_country__c = CountriesList.Id;
        controller7.Application.outside_telephone_number__c = '12353';
        controller7.Application.Emirates_dropdown__c = emiratesObject.Id;
        controller7.Application.City_dropdown__c  = cityObject.Id;
        controller7.Application.Area_dropdown__c = areaObject.Id;
        controller7.Application.P_O_Box__c = '12353';
        controller7.Application.Name_of_Authorized_Signatory__c = 'Test';
        controller7.Application.inside_residence_telephone__c = '12353'; 
        controller7.Application.inside_office_telephone__c = '12353';
        controller7.Application.applicants_email_address__c = 'xyz@xyz.com';
        controller7.Application.Company_Name__c = acc.Id;
        controller7.Application.Establishment_Name1__c = acc.Id;
        controller7.companyDate = passportIssue;//String.valueOf(System.Today().addyears(1));
        controller7.Application.City_of_Birth__c = 'Test'; 
        controller7.Application.Passport_Number__c = 'Test'; 
        controller7.passportIssueDate = passportIssue;//String.valueOf(System.Today().addyears(1));
        controller7.passportExpiryDate = passportExpiry;//String.valueOf(System.Today().addyears(3));
        controller7.Application.Passport_Country_of_Issue__c = CountriesList.Id;
        controller7.Application.Passport_City_of_Issue__c = 'Karachi';
        
        controller7.Application.Company_Index_Card_Number__c = 'Test';
        controller7.dateOfBirth = dateBirth; //String.valueOf(System.Today().addyears(1));
        controller7.Application.Currently_Nationality__c = Countries.Id;
        controller7.Application.Previous_Nationality__c = Countries.Id;
        controller7.Application.Title__c = 'Test';
        controller7.Application.First_Name__c = 'Test';
        controller7.Application.Last_Name__c = 'Test';
        controller7.CreateApplication();
        
    
    }
    
    public static testMethod void testMyController() 
    {
        //Test Data 
        
        Account acc = new Account();
        acc.Name = 'Test';
        insert acc;
        
        
        Emirates__c emiratesObject = new Emirates__c();
        emiratesObject.Name = 'Test';
        emiratesObject.Active__c = true;
        emiratesObject.E_form_code__c = 'Test';
        insert emiratesObject;
        
        City__c cityObject = new City__c();
        cityObject.Name = 'Test';
        cityObject.Active__c = true;
        cityObject.E_form_code__c = 'Test';
        cityObject.Emirates__c  = emiratesObject.Id;
        insert cityObject;
        
        Area__c areaObject = new Area__c();
        areaObject.Name = 'Test';
        areaObject.Active__c = true;
        areaObject.E_form_code__c = 1;
        areaObject.City__c = cityObject.Id;
        insert areaObject;
        
        Country__c Countries = new Country__c();
        Countries.Name = 'Test';
        Countries.eFormCode__c = 'Test';
        Countries.IsActive__c = true;
        insert COuntries;
        
        
        CountriesList__c CountriesList = new CountriesList__c();
        CountriesList.Name = 'Test';
        CountriesList.IsActive__c = true;
        CountriesList.eFormCode__c = 'Test';
        insert CountriesList;
        
        Occupation__c OCP = new Occupation__c();
        OCP.Name = 'Test';
        OCP.IsActive__c = true;
        OCP.eFormCode__c = 'Test';
        insert OCP;
        
        Qualification__c QualificationsList = new Qualification__c();
        QualificationsList.Name = 'Test';
        QualificationsList.IsActive__c = true;
        QualificationsList.eFormCode__c = 'Test';
        insert QualificationsList;    
        
        Passport_Type__c pt = new Passport_Type__c();
        pt.Name = 'Test';
        pt.IsActive__c = true;
        pt.eFormCode__c = 'Test';
        insert pt;
        
        //PageReference pageRef = Page.vrf;
        //Test.setCurrentPage(pageRef);
        vrf_ctlr controller = new vrf_ctlr();
        
        List<SelectOption> TestOptions = new List<SelectOption>();
        TestOptions = controller.getCountries();
        TestOptions = controller.getCountriesList();
        TestOptions = controller.getCompanies();
        TestOptions = controller.getJobTitles();
        TestOptions = controller.getQualifications();
        TestOptions = controller.getGenders();
        TestOptions = controller.getTitles();
        TestOptions = controller.getVRFVisaType();
        controller.Application.VRF_Pre_approval_required__c = true;
        TestOptions = controller.getVRFAvailableIn();
        controller.Application.VRF_Pre_approval_required__c = false;
        TestOptions = controller.getVRFAvailableIn();
        TestOptions = controller.getPassportTypes();
        TestOptions = controller.getHoldUAEPermit();
        TestOptions = controller.getPortOfEntries();
        TestOptions = controller.getMaritalStatuses();
        TestOptions = controller.getReligions();
        TestOptions = controller.getEmirates();
        TestOptions = controller.getCity();
        TestOptions = controller.getArea();
        TestOptions = controller.getEstablishmentType();
        TestOptions = controller.getrelation();
        TestOptions = controller.getSponsorDepartment();
        TestOptions = controller.getVRFFields();
        //vrf_ctlr.Initializevariables();
        
        
        //Test for the Dates in Application...
        Health_Card_Renewal_Form__c applicationObject = new Health_Card_Renewal_Form__c();
        applicationObject.VRF_Visa_Type__c = 'New Visa';
        applicationObject.DRV_Sponser_First_Name__c = 'Test';
        applicationObject.DRV_Sponser_Last_Name__c = 'Test';
        applicationObject.DRV_Sponser_Middle_Name__c = 'Test';
        applicationObject.First_Name__c = 'Test';
        applicationObject.Middle_Name__c = 'Test';
        applicationObject.Last_Name__c = 'Test';
        string dateBirth  = String.valueOf(System.Today().addyears(1)); 
        dateBirth = string.valueOf(dateBirth.split('-')[1]+'/'+dateBirth.split('-')[2]+'/'+dateBirth.split('-')[0]);
        
        PageReference Pg;
        string result = null;
        Pg = controller.ResetApplication();
        Pg = controller.ToMainMenu();
        result = controller.getsoapXML();
        result = controller.getxml();
        
        //Pg = controller.CreateApplication();
        controller.Application.TAMM_VIP_Service__c = true;
        controller.Application.VRF_Visa_Type__c = 'New Visa';
        controller.Application.VRF_Pre_approval_required__c = false;
        controller.Application.VRF_Transfer_Flag__c = true;
        controller.Application.VRF_Available_In__c = 'Individual is currently sponsored by father/husband/another individual';
       // controller.lastDateOfEntry = String.ValueOf(Date.TODAY());
       // controller.Application.Hold_UAE_Permit__c = 'Yes';
       // controller.Application.Port_of_Entry__c = 'Other';
       // controller.Application.VRF_Transfer_Flag__c = false;
        
        controller.Application.Sponsor_Type__c = 'Resident';
        controller.Application.Sponsor_Department__c = 'AJMAN';
        controller.Application.DRV_Sponser_First_Name__c = 'Cloud';
        controller.Application.DRV_Sponser_Middle_Name__c = 'Cloud';
        controller.Application.DRV_Sponser_Last_Name__c = 'Concept';
       // controller.Application.DRV_Sponser_Currently_Nationality__c  = Countries.id;
        controller.Application.Sponsor_Gender__c = 'Female';
        controller.Application.DRV_Relation_with_Sponser__c = 'Brother';
        controller.Application.Residency_Years__c  = '5';
        controller.SponserDate = String.ValueOf(Date.TODAY());
        controller.SponserPassportExpiry = String.ValueOf(Date.TODAY());
        controller.SponserResidencyExpiry = String.ValueOf(Date.TODAY());
        controller.Application.DRV_Sponser_Passport_Number__c = '123';
        controller.Application.Mother_Full_Name__c = 'r';
        controller.Application.Sponsor_Address__c = 'Sponsor Address';
        controller.Application.Residency_Tel__c = '1';
        controller.Application.DRV_Sponser_Office_Phone__c = '2';
        controller.Application.P_O_Box__c = '3';
        controller.Application.DRV_Sponser_Mobile__c = '4';
         
         
        
        controller.Application.Title__c = 'Mr';
        controller.Application.First_Name__c = 'Cloud';
        controller.Application.Middle_Name__c = 'S';
        controller.Application.Last_Name__c = 'Concept';
        controller.Application.Arabic_Name__c = 'Ar Concept';
        
        //Country__c Countries = [SELECT id, Name FROM Country__c LIMIT 1];
        controller.Application.Currently_Nationality__c = Countries.id;
        controller.Application.Previous_Nationality__c = Countries.id;
        controller.dateOfBirth = String.ValueOf(Date.TODAY());
        
        //CountriesList__c CountriesList = [SELECT id, Name FROM CountriesList__c LIMIT 1];
        controller.Application.Country_of_Birth__c = CountriesList.id;
        controller.Application.City_of_Birth__c = 'SomePlace';
        
        
        //Passport_Type__c pt = [SELECT id, name FROM Passport_Type__c LIMIT 1];
        controller.Application.Passport_Type__c = pt.id;
        controller.Application.Passport_Number__c = '2345678AS';
        controller.passportIssueDate = String.ValueOf(Date.TODAY());
        controller.passportExpiryDate = String.ValueOf(Date.TODAY());
        controller.Application.Passport_Country_of_Issue__c = CountriesList.id;
        controller.Application.Passport_City_of_Issue__c = 'SOMECITY';  
        controller.Application.Applicant_Mobile_Number__c = '58698165316';
              
        controller.Application.Mother_Full_Name__c = 'SOMENAME';
        controller.Application.Marital_Status__c = 'Single';
        controller.Application.Religion__c = 'Muslim';
       
        
        //Occupation__c OCP = [Select id, name FROM Occupation__c LIMIT 1];
        controller.Application.Job_Title_Position__c = OCP.id;
        
        
        
        //Qualification__c QualificationsList = [SELECT id, Name FROM Qualification__c LIMIT 1];
        controller.Application.Education_Qualification__c = QualificationsList.id;
        controller.Application.Gender__c = 'Male';
        
        //Account acc = [SELECT id, name FROM Account LIMIT 1];
        
        
        controller.Application.Company_Name__c = acc.id;
        //controller.Application.Company_Point_Of_Contact_Mobile_Number__c = '23456789';
        controller.Application.Company_Index_Card_Number__c = '123';
        controller.Application.Name_of_Authorized_Signatory__c = 'SOMEONE';
        controller.companyDate = String.ValueOf(Date.TODAY());
        controller.Application.VRF_Verify1__c = true;
        controller.Application.VRF_Verify2__c = true;
        controller.checktest();
        Pg = controller.CreateApplication();
        vrf_ctlr controller1 = new vrf_ctlr();
        Pg = controller1.CreateApplication();
        
        controller.Render_NewVisa();
        controller.Render_Individual();
        controller.Render_Approval();
        controller.Render_Transfer();
        controller.Render_GovernmentOrFreeZone();
        controller.Render_FatherHusband();
        List<SelectOption> mlist = controller.getPortOfEntries();
        HttpResponse res = new HttpResponse();
        //xml = res.getBody();
        String xmlString = '<books><book>My Book</book><book>Your Book</book></books>';
        XmlStreamReader xsr = new XmlStreamReader(xmlString);
        String str = vrf_ctlr.readXMLResponse(xsr,'book');
        
        
        
        //Negative Test Class...
        vrf_ctlr controller2 = new vrf_ctlr();
        controller2.Application.VRF_Visa_Type__c  = 'Renewal';
        controller2.Application.VRF_Pre_approval_required__c = false; 
        controller2.Application.VRF_Transfer_Flag__c = false;
        
        //Calling Methods...
        controller2.Render_NewVisa();
        controller2.Render_Approval();
        
        //Negative Test Class...
        vrf_ctlr controller3 = new vrf_ctlr();
        controller3.Application.VRF_Visa_Type__c  = 'New Visa';
        controller3.Application.VRF_Pre_approval_required__c = true; 
        controller3.Application.VRF_Transfer_Flag__c = false;
        controller3.Application.VRF_Available_In__c = 'individual currently inside UAE';
        //controller3.lastDateOfEntry = String.ValueOf(Date.TODAY());
       
        //Calling Methods...
        controller3.Render_NewVisa();
        controller3.Render_Approval();
        controller3.Render_Individual();
        
        //Negative Test Class...
        vrf_ctlr controller4 = new vrf_ctlr();
        controller4.Application.VRF_Visa_Type__c  = 'New Visa';
        controller4.Application.VRF_Pre_approval_required__c = false; 
        controller4.Application.VRF_Transfer_Flag__c = false;
        controller4.Application.VRF_Available_In__c = 'individual currently outside UAE';
        //controller.Application.Hold_UAE_Permit__c = 'Yes';
        //controller.Application.Port_of_Entry__c = 'Other';
       
        //Calling Methods...
        controller4.Render_NewVisa();
        controller4.Render_Individual();
        
        //Negative Test Class...
        vrf_ctlr controller5 = new vrf_ctlr();
        controller5.Application.VRF_Visa_Type__c = 'New Visa';
        controller5.Application.VRF_Pre_approval_required__c = false;
        controller5.Application.VRF_Transfer_Flag__c = true;
        controller5.Application.VRF_Available_In__c = 'Individual is currently sponsored by Dubai Government Entity or a Free zone';
        
        controller5.Application.Sponsor_Type__c = 'Estbalishment';
        controller5.Application.Establishment_Number__c = '222';
        controller5.Application.DRV_Sponser_First_Name__c = 'C';
        controller5.Application.Commercial_Activity__c = 'CC';
        controller5.Application.Sponsor_Emirates__c = 'CCC';
        controller5.Application.Establishment_Type__c = 'Government';
        controller5.Application.Sponsor_Address__c = 'Address';
        controller5.Application.Residency_Tel__c = '6';
        controller5.Application.DRV_Sponser_Office_Phone__c = '7';
        controller5.Application.P_O_Box__c = '8';
        controller5.Application.DRV_Sponser_Mobile__c = '9';
        
        // Class Methods
        controller5.Render_Transfer();
        controller5.Render_NewVisa();
        controller5.Render_GovernmentOrFreeZone();
        TestOptions = controller5.getSponsorType();
        
               
        
    }
    
    
   
    
}